﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:vm="clr-namespace:OdcTest.ViewModels"
    xmlns:ctrls="clr-namespace:Odyssey.Controls;assembly=Odyssey"
    xmlns:assets="clr-namespace:OdcTest.Assets"
    xmlns:bh="clr-namespace:Odyssey.Behaviors;assembly=Odyssey"
    xmlns:Custom="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:Odyssey_Behaviors="clr-namespace:Odyssey.Behaviors;assembly=Odyssey" 
    x:Class="OdcTest.Views.PickersPage"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="728" d:DesignWidth="480"
    shell:SystemTray.IsVisible="False" DataContext="{StaticResource pickersViewModel}" bh:TiltEffect.IsTiltEnabled="True">

    <d:DesignProperties.DataContext>
        <vm:PickersViewModel/>
    </d:DesignProperties.DataContext>

    <Custom:Interaction.Behaviors>
        <Odyssey_Behaviors:SwingEffectBehavior Angle="-90" />
    </Custom:Interaction.Behaviors>

        <Grid x:Name="LayoutRoot" Background="Transparent" >
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>

            <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
                <TextBlock x:Name="ApplicationTitle" Text="ODYSSEY" Style="{StaticResource PhoneTextNormalStyle}"/>
                <TextBlock x:Name="PageTitle" Text="pickers" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
            </StackPanel>

            <ScrollViewer VerticalScrollBarVisibility="Auto" Grid.Row="1" Margin="12,0,12,0">
                <StackPanel x:Name="ContentPanel" >
                    <TextBlock Text="choose date" Style="{StaticResource PhoneTextSubtleStyle}"/>

                    <ctrls:DatePickerBox SelectedItem="{Binding Date, Mode=TwoWay}"/>

                    <TextBlock Height="24"/>
                    <TextBlock Text="choose time" Style="{StaticResource PhoneTextSubtleStyle}"/>

                    <ctrls:TimePickerBox SelectedItem="{Binding Time, Mode=TwoWay}"/>

                    <TextBlock Height="24"/>
                    <TextBlock Text="choose from 4 items" Style="{StaticResource PhoneTextSubtleStyle}"/>
                    <ctrls:DropDown>
                        <ctrls:DropDownItem Content="Item 1"/>
                        <ctrls:DropDownItem Content="Item 2"/>
                        <ctrls:DropDownItem Content="Item 3"/>
                        <ctrls:DropDownItem Content="Item 4"/>
                    </ctrls:DropDown>

                    <TextBlock Height="24"/>
                    <TextBlock Text="choose item" Style="{StaticResource PhoneTextSubtleStyle}"/>

                    <ctrls:ListPicker SelectedItem="{Binding SelectedItem, Mode=TwoWay}" ItemsSource="{Binding Items}" Title="CHOOSE ITEM">
                        <ctrls:ListPicker.ContentTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Name}"  VerticalAlignment="Center" />
                            </DataTemplate>
                        </ctrls:ListPicker.ContentTemplate>
                        <ctrls:ListPicker.ItemTemplate>
                            <DataTemplate>
                                <Border Height="80">
                                    <TextBlock x:Name="text" Text="{Binding Name}"  
                                               Margin="{StaticResource PhoneTouchTargetOverhang}"
                                               FontSize="{StaticResource PhoneFontSizeExtraLarge}" VerticalAlignment="Center"/>
                                </Border>
                            </DataTemplate>
                        </ctrls:ListPicker.ItemTemplate>
                    </ctrls:ListPicker>

                </StackPanel>
            </ScrollViewer>
        </Grid>

    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.check.rest.png" Text="OK" />
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>
